<!--
 * @Author: wangming
 * @Date: 2021-04-07 18:11:48
 * @LastEditors: wangming
 * @LastEditTime: 2022-05-07 16:03:29
 * @Description: 列表组件
-->
<template>
  <div class="box sz layoutbox p15 ks-col">
    <tableTitle
      :config="config"
      v-if="config.__config.tableTitle && config.__config.tableTitleContent"
    >
    </tableTitle>
    <tableHeader
      v-if="config.__config.searchStatus === 2"
      :column="config.__config.getSearchmodelList"
      :class="{ active: isAcitve('tb_h') }"
      :independentAdvancedSearch="config.__config.independentAdvancedSearch"
      :advancedSearchConfig="config.__config.advancedSearchConfig"
      :searchBtnPos="config.__config.searchBtnPos"
      @click.native.stop="handleAdd('tb_h')"
      @inClick="(v) => handleAdd('tb_h_i', v)"
      :activeId="getModelForm.code"
    ></tableHeader>
    <tableButtons
      v-if="config.hlcustomBtn"
      :config="config"
      :class="{ active: config.hlcustomBtn.key === getModelForm.key }"
      @click.native.stop="
        handleAdd(config.hlcustomBtn.tagName, config.hlcustomBtn)
      "
    >
    </tableButtons>
    <hmTable
      :tablekey="config.key"
      :activeHeader="activeHeader"
      :setting="config.__config"
      :tableData="tableData"
      :column="config.__config.getEntitymodelList"
      :class="{ active: isAcitve('tb_lt') }"
      @click.native.stop="handleAdd('tb_lt')"
      @header-click="({ type, form }) => handleAdd(type, form)"
    >
    </hmTable>
    <div class="tr mt24" v-if="config.__config.pageStatus === 1">
      <x-pagination :total="total" />
    </div>
  </div>
</template>

<script>
import tablemixins from "./tablemixins";
export default {
  mixins: [tablemixins],
};
</script>

<style lang="scss" scoped>
@import "./table.scss";
</style>
